// MDIViewWindow.cpp : implementation file
//

#include "stdafx.h"
#include "Camino.h"
#include "MDIViewWindow.h"


// CMDIViewWindow

IMPLEMENT_DYNCREATE(CMDIViewWindow, CMDIChildWnd)

CMDIViewWindow::CMDIViewWindow()
{

}

CMDIViewWindow::~CMDIViewWindow()
{
}


BEGIN_MESSAGE_MAP(CMDIViewWindow, CMDIChildWnd)
END_MESSAGE_MAP()


// CMDIViewWindow message handlers


BOOL CMDIViewWindow::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Add your specialized code here and/or call the base class
		cs.style &= ~WS_THICKFRAME;
		cs.style |= WS_BORDER;
		cs.style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
	return CMDIChildWnd::PreCreateWindow(cs);
}


BOOL CMDIViewWindow::LoadFrame(UINT nIDResource, CFrameWnd *pCurrentFrame,
	CRuntimeClass *pNewViewClass, DWORD dwDefaultStyle) {
	CCreateContext Context;
	Context.m_pCurrentFrame = pCurrentFrame;
	Context.m_pNewViewClass = pNewViewClass;
	if (!CMDIChildWnd::LoadFrame(nIDResource, dwDefaultStyle, NULL, &Context))
		return FALSE;
	CString strFullString, strTitle;
	if (strFullString.LoadString(nIDResource))
		AfxExtractSubString(strTitle, strFullString, CDocTemplate::docName);
	SetTitle(strTitle);
	m_hMenu = ::LoadMenu(AfxGetResourceHandle(), MAKEINTRESOURCE(nIDResource));
	SetHandles(m_hMenu, NULL);
	InitialUpdateFrame(NULL, TRUE);
	return TRUE;
}